import {
	http
} from '../httpIndex.js'
export default {
	// 展示宿舍考勤查询/app/ManualAttence/listDorManualAttence?buildingNo=
	listDorManualAttence(buildingNo, storey, accessDate) {
		return http.get(
			`app/ManualAttence/listDorManualAttence?buildingNo=${buildingNo}&storey=${storey}&accessDate=${accessDate}`
		)
	},
	// 宿舍考勤列表 /app/ManualAttence/getAppDorListByStorey
	getAppDorListByStorey(buildingNo, storey) {
		return http.get(`app/ManualAttence/getAppDorListByStorey?buildingNo=${buildingNo}&storey=${storey}`)
	},
	// 某个宿舍的学生app/ManualAttence/getAppStudentListByDId
	getAppStudentListByDId(dormitoryId, accessDate) {
		return http.get(`app/ManualAttence/getAppStudentListByDId?dormitoryId=${dormitoryId}&accessDate=${accessDate}`)
	},
	// 处理值班记录
	findToDo(id) {
		return http.get(`app/dutyHandle/find/todoList/${id}`)
	},
	//查看值班处理记录
	getRecord(data) {
		return http.post(`app/dutyHandle/findList`, data)
	},
	// 学生详细信息 app/ManualAttence/getAppStuInfoById
	getAppStuInfoById(studentNo, accessDate) {
		return http.get(`app/ManualAttence/getAppStuInfoById?studentNo=${studentNo}&accessDate=${accessDate}`)
	},
	// 提交学生宿舍考勤信息 /app/ManualAttence/createAppAttence
	createAppAttence(attenceDate, dormitoryId, statusArray, studentNoArray) {
		return http.post('app/ManualAttence/createAppAttence', {
			attenceDate: attenceDate,
			dormitoryId: dormitoryId,
			statusArray: statusArray,
			studentNoArray: studentNoArray
		})
	},
	// 展示宿舍卫生 app/Hygiene/getHygieneAll
	getHygieneAll(buildingNo, storey, checkDate) {
		return http.get(`app/Hygiene/getHygieneAll?buildingNo=${buildingNo}&storey=${storey}&checkDate=${checkDate}`)
	},
	// 查询个人卫生情况 app/Hygiene/getAppStuHyListByDId?dormitoryId
	getAppStuHyListByDId(dormitoryId, checkDate) {
		return http.get(`app/Hygiene/getAppStuHyListByDId?dormitoryId=${dormitoryId}&checkDate=${checkDate}`)
	},
	// 提交宿卫生情况 /app/Hygiene/createHygiene
	createHygiene(bdormitoryId, checkDate, createBy, grade, hygieneItemRecordList) {
		return http.post("app/Hygiene/createHygiene", {
			bdormitoryId: bdormitoryId,
			checkDate: checkDate,
			createBy: createBy,
			grade: grade,
			hygieneItemRecordList: hygieneItemRecordList
		})
	},
	// 获取整体宿舍情况 /app/Hygiene/getHygieneByDor?bdormitoryId=1&checkDate=
	getHygieneByDor(bdormitoryId, checkDate, id) {
		return http.get(`app/Hygiene/getHygieneByDor?bdormitoryId=${bdormitoryId}&checkDate=${checkDate}`)
	},
	// 提交所有学生宿舍卫生情况 /app/Hygiene/createUpdateStuHygienes
	createUpdateStuHygienes(bdormitoryId, buildingNo, checkDate, dormitoryNo, gradeArray, storey, studentNoArray,
		hygieneItemRecordList) {
		return http.post("app/Hygiene/createUpdateStuHygienes", {
			bdormitoryId: bdormitoryId,
			buildingNo: buildingNo,
			checkDate: checkDate,
			dormitoryNo: dormitoryNo,
			gradeArray: gradeArray,
			storey: storey,
			studentNoArray: studentNoArray,
			hygieneItemRecordList: hygieneItemRecordList
		})

	},
	// 提交宿舍报修 /app/Repair/createRepairUpload
	createRepairUpload(upload, bdormitoryId, deviceIds, repairDesc, status) {},

	//提交值班巡查处理
	getUpdate(patrolId, handleInfo, actualHandler, handleImg) {
		return http.put(`app/dutyHandle/update/status`, {
			patrolId: patrolId,
			handleInfo: handleInfo,
			actualHandler: actualHandler,
			handleImg: handleImg
		})
	},


	//根据楼栋，楼层,检查时间段查询当层宿舍今日卫生检查情况(楼栋，楼层，检查时间段(0:假期 1:上午 2:下午))
	getEachLayerDormitoryHygiene(buildNo,floorNo,checkItemSpan) {
		return http.get(`app/dormitory/hygiene/getEachLayerDormitoryHygiene?buildNo=${buildNo}&floorNo=${floorNo}&checkItemSpan=${checkItemSpan}`)
	},
	//根据宿舍id,检查时间段查询宿舍今日卫生检查情况(宿舍id，检查时间段(0:假期 1:上午 2:下午))
	getDormitoryHygieneDetails(dormitoryId,checkItemSpan,rq)  {
		return http.get(`app/dormitory/hygiene/getDormitoryHygieneDetails?dormitoryId=${dormitoryId}&checkItemSpan=${checkItemSpan}&rq=${rq}`)
	},
	//宿舍卫生检查提交
	submitHygiene(data) {
		return http.post(`app/dormitory/hygiene/submitHygiene`, data)
	},
	//宿舍卫生消息推送
	pushDorHygieneInfo(dormitoryId,grade,checkTimeSpan,rq) {
		return http.get(`app/dormitory/hygiene/pushDorHygieneInfo?dormitoryId=${dormitoryId}&grade=${grade}&checkTimeSpan=${checkTimeSpan}&rq=${rq}`)
	},

	// 查询当前部门经理的部门下未打卡的名单
	getDormitoryUnclockStudentsByDepeId(userId, checkDate,classId) {
		return http.get(`app/Attence/listDormitoryStu?userId=${userId}&checkDate=${checkDate}&classId=${classId}`)
	},
	getDormitoryUnclockClassList(userId, checkDate) {
		return http.get(`app/Attence/getDormitoryUnclockClassList?userId=${userId}&checkDate=${checkDate}`)
	},

	// 查询当前部门经理下周末未打卡的名单
	getWeekendUnclockStudentsByDeptId(userId, checkDate,classId) {
		return http.get(`app/Attence/listWeekendUnclockStu?userId=${userId}&checkDate=${checkDate}&classId=${classId}`)
	},
	getWeekendUnclockClassList(userId, checkDate) {
		return http.get(`app/Attence/getWeekendUnclockClassList?userId=${userId}&checkDate=${checkDate}`)
	},



	//根据用户id查询宿舍卫生统计信息
	getAppDorHygieneCount(userId,rq) {
		return http.get(`app/dormitory/hygiene/getAppDorHygieneCount?userId=${userId}&rq=${rq}`)
	},
	//根据班级id查询不合格的宿舍卫生信息
	getBadDorHygieneByClassId(classId,rq) {
		return http.get(`app/dormitory/hygiene/getBadDorHygieneByClassId?classId=${classId}&rq=${rq}`)
	},
	getDormitoryAttenceSummary(userId, dateTime, operateType) {
		return http.get(`app/Attence/getDeptDormitorySummary?userId=${userId}&accessDate=${dateTime}&operateType=${operateType}`)
	},
	getWeekendAttenceSummary(userId, dateTime) {
		return http.get(`app/Attence/getDeptDormitorySummary?userId=${userId}&accessDate=${dateTime}`)
	},
	getDormitoryStudentListByType(classId, accessDate, type) {
		return http.get(`app/Attence/getStuListByType?classId=${classId}&accessDate=${accessDate}&type=${type}`)
	},

	getWeekendStudentListByType(classId, accessDate, type) {
		return http.get(`app/Attence/getWeekendStuListByType?classId=${classId}&accessDate=${accessDate}&type=${type}`)
	},
	
	getAttenceStatisticalData(userId, accessDate, type) {
		return http.get(`app/Attence/getAttenceStatisticalData?userId=${userId}&accessDate=${accessDate}&type=${type}`)
	}

}
